local skynet = require "skynet"

local call = {}

local function errorFunc(err)
    skynet.error("pcall err:" .. tostring(err) .. " traceback:" .. debug.traceback())
end

function call.pcall(f,...)
    local args = {...}
    xpcall(function()
        f(table.unpack(args))
    end,errorFunc)
end

return call